home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Pwait3(2) Oct. 1, 1991 Pwait3(2)
-
-
- N✓NA✓AM✓ME✓E
- Pwait, Pwait3 - get exit status of children
-
- S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
- LONG Pwait();
- LONG Pwait3( WORD flag, LONG *rusage );
-
- D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
- _✓P_✓w_✓a_✓i_✓t_✓3 attempts to determine the exit code for any stopped
- children or children that have terminated. If bit 1 of
- _✓f_✓l_✓a_✓g is set, then children that are stopped due to job
- control are reported; otherwise only children that have
- actually terminated are reported. A stopped process will
- be reported at most once (unless it is re-started and
- stopped again); similarly a terminated process will be
- reported only once.
-
- If the process does have children, but none are currently
- stopped or terminated and not yet waited for, then the
- behavior of _✓P_✓w_✓a_✓i_✓t_✓3 is controlled by bit 0 of _✓f_✓l_✓a_✓g. If it
- is clear, the function will wait until some child is
- stopped or terminates; if it is set, the function will
- return immediately.
-
- The _✓r_✓u_✓s_✓a_✓g_✓e parameter, if non-zero, should point to two
- long words, into which information about the child's CPU
- time usage is placed, as follows:
- rusage[0]: milliseconds spent by child in user space
- rusage[1]: milliseconds spent by child in kernel space
-
- The _✓P_✓w_✓a_✓i_✓t() system call is equivalent to _✓P_✓w_✓a_✓i_✓t_✓3(2, (LONG
- *)0), and is provided both for convenience and for back-
- ward compatibility.
-
- R✓RE✓ET✓TU✓UR✓RN✓NS✓S
- If a child process is found, its process id is placed in
- the upper 16 bits of the 32 bit value returned, and its
- exit status (as passed to _✓P_✓t_✓e_✓r_✓m or _✓P_✓t_✓e_✓r_✓m_✓r_✓e_✓s, as determined
- implicitly by _✓P_✓t_✓e_✓r_✓m_✓0, or as determined by the type of sig-
- nal that stopped or killed the process) is placed in the
- lower 16 bits. If the process was stopped or terminated by
- signal _✓n, then its exit status will be ( _✓n<< 8 ) | _✓x.
- where _✓x is 127 if the process was stopped and 0 if the
- process was terminated.
-
- 0 if bit 0 of _✓f_✓l_✓a_✓g is set and the _✓P_✓w_✓a_✓i_✓t_✓3 system call would
- have otherwise blocked waiting for a child to exit or
- stop.
-
- EFILNF if no unwaited for children exist
-
- S✓SE✓EE✓E A✓AL✓LS✓SO✓O
- _✓P_✓e_✓x_✓e_✓c(2), _✓P_✓t_✓e_✓r_✓m(2), _✓P_✓t_✓e_✓r_✓m_✓0(2), _✓P_✓t_✓e_✓r_✓m_✓r_✓e_✓s(2)
-
-
-
-
- Version 0.9 MiNT Programmer's Manual 1
-
-
-
-
-
- Pwait3(2) Oct. 1, 1991 Pwait3(2)
-
-
- B✓BU✓UG✓GS✓S
- It is not possible to wait for a specific child process.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Version 0.9 MiNT Programmer's Manual 2
-
-
-